#!/bin/sh
while true
do
   i=`ps -ef|grep 'Task.run'|grep -v grep|wc -l`
   if [ $i -eq 0 ]; then
       /usr/bin/php -d display_error /app/cli.php $1 Task.run &
   fi
   sleep 10
done